package com.qs.shop.user;


import com.qs.shop.order.OrderRequest;
import com.qs.shop.order.OrderResponse;
import com.qs.shop.order.service.OrderService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ConsumerApp {

    public static void main(String[] args) {

        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("order-consumer.xml");
        OrderService orderService = (OrderService) applicationContext.getBean("orderService");
        System.out.println("--->>orderService" + orderService);
        OrderRequest request = new OrderRequest();
        request.setOrderName("1000部iPhoneX的订单");
        OrderResponse orderResponse = orderService.doOrder(request);
        System.out.println("---->>>" + orderResponse);
    }
}
